package com.baidu.file;

import java.io.File;

public class D01_FIleDemo {
    public static void main(String[] args) {
        //1.创建file对象
        //相对路径
        File file = new File("src/001.jpg");
        File file1 = new File("001.jpg");
        File dicFile = new File("src");

        boolean directory = dicFile.isDirectory();
        long length = file.length();
        boolean idFIle = file.isFile();
        boolean exists = dicFile.exists();
        boolean exists1 = file1.exists();

        System.out.println(exists1);
        System.out.println(exists);
        System.out.println(idFIle);
        System.out.println(length);
        System.out.println(directory);
    }
}
